@extends('common.admin-master')

@section('html-body')
    <div class="content">

        <div class="header">
            <h1 class="page-title">用户列表</h1>
        </div>

        <div class="container-fluid">
            <div class="row-fluid">
                <div class="row-fluid">
                    <div class="block span12">
                        <a href="#tablewidget" class="block-heading" data-toggle="collapse">Users<span class="label label-warning">+10</span></a>
                        <div id="tablewidget" class="block-body collapse in">
                            <table class="table">
                                <thead>
                                <tr>
                                    <th>用户id</th>
                                    <th>手机号</th>
                                    <th>用户角色</th>
                                    <th>注册IP</th>
                                    <th>注册时间</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($users as $user)
                                <tr>
                                    <td>{{$user->id}}</td>
                                    <td>{{$user->phone}}</td>
                                    <td>{{$user->role==0?'服务商':'客户'}}</td>
                                    <td>{{$user->reg_ip}}</td>
                                    <td>{{$user->reg_time}}</td>
                                </tr>
                                    @endforeach
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div class="pagination">
                        <ul>
                            {!! $users->render() !!}
                        </ul>
                    </div>
                </div>

            </div>
        </div>
    </div>



    <script type="text/javascript">
        $("[rel=tooltip]").tooltip();
        $(function() {
            $('.demo-cancel-click').click(function(){return false;});
        });

        $('#nav_tab a').click(function (e) {
            e.preventDefault();
            $(this).tab('show');
        })

    </script>

@endsection


